home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / dbus-1 / event.d / 70system-tools-backends < prev   
Encoding:
Text File  |  2007-03-12  |  1.7 KB  |  78 lines

  1. #! /bin/sh
  2. #
  3. # system-tools-backends
  4. #        dbus init script
  5. #
  6. #        (Stolen from the hal package)
  7. #            Written by Martin Waitz based on skeleton code
  8. #            written by Miquel van Smoorenburg <miquels@cistron.nl>.
  9. #            Modified for Debian 
  10. #            by Ian Murdock <imurdock@gnu.ai.mit.edu>.
  11. #
  12.  
  13. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  14. DAEMON=/usr/bin/system-tools-backends
  15. PIDFILE=/var/run/system-tools-backends.pid
  16. NAME=system-tools-backends
  17. DESC="System Tools Backends"
  18.  
  19. . /lib/lsb/init-functions
  20.  
  21. test -x $DAEMON || exit 0
  22.  
  23. set -e
  24.  
  25. do_start() {
  26.   if [ ! -d $PIDDIR ]; then
  27.     mkdir -p $PIDDIR
  28.   fi
  29.     log_daemon_msg "Starting $DESC" "$NAME"
  30.     start-stop-daemon --start --startas $DAEMON --quiet --pidfile $PIDFILE
  31.     log_end_msg $?
  32. }
  33.  
  34. do_stop() {
  35.     log_daemon_msg "Stopping $DESC" "$NAME"
  36.     start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE --startas $DAEMON
  37.     log_end_msg $?
  38. }
  39.  
  40. case "$1" in
  41.   start)
  42.     do_start
  43.     ;;
  44.   stop)
  45.     do_stop
  46.     ;;
  47.   #reload)
  48.     #
  49.     #    If the daemon can reload its config files on the fly
  50.     #    for example by sending it SIGHUP, do it here.
  51.     #
  52.     #    If the daemon responds to changes in its config file
  53.     #    directly anyway, make this a do-nothing entry.
  54.     #
  55.     # echo "Reloading $DESC configuration files."
  56.     # start-stop-daemon --stop --signal 1 --quiet --pidfile \
  57.     #    /var/run/$NAME.pid --exec $DAEMON
  58.   #;;
  59.   restart|force-reload)
  60.     #
  61.     #    If the "reload" option is implemented, move the "force-reload"
  62.     #    option to the "reload" entry above. If not, "force-reload" is
  63.     #    just the same as "restart".
  64.     #
  65.   do_stop
  66.     sleep 5
  67.   do_start
  68.     ;;
  69.   *)
  70.     N=/etc/init.d/$NAME
  71.     # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
  72.     log_success_msg "Usage: $N {start|stop|restart|force-reload}" >&2
  73.     exit 1
  74.     ;;
  75. esac
  76.  
  77. exit 0
  78.